Skip to content

Conversation

@leeleeleeleejun
Copy link
Member

@leeleeleeleejun leeleeleeleejun commented Nov 11, 2025

#️⃣연관된 이슈

📝작업 내용

admin api 연동

스크린샷 (선택)

💬리뷰 요구사항(선택)

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요

ex) 메서드 XXX의 이름을 더 잘 짓고 싶은데 혹시 좋은 명칭이 있을까요?

Summary by CodeRabbit

릴리스 노트

  • New Features

    • 요청 상세 페이지 UI 재설계 및 개선
    • 카테고리 및 태그 기능 추가
    • 요청 검토 및 거절 기능 추가
  • Refactor

    • 요청 목록 페이지 동적 데이터 로딩 구현

@leeleeleeleejun leeleeleeleejun self-assigned this Nov 11, 2025
@leeleeleeleejun leeleeleeleejun linked an issue Nov 11, 2025 that may be closed by this pull request
3 tasks
@coderabbitai
Copy link

coderabbitai bot commented Nov 11, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Admin 애플리케이션의 요청 관리 기능을 개선합니다. API 경로를 단수형에서 복수형으로 변경하고, 정적 목데이터에서 동적 데이터 페칭으로 전환합니다. 새로운 API 서비스 함수와 타입을 추가하며, 요청 상세 페이지 구조를 재정렬합니다.

Changes

Cohort / File(s) Summary
Next.js 설정 및 이미지 최적화
apps/admin/next.config.ts
원격 이미지 패턴 설정 추가: pstatic.net, daumcdn.net, blog.kakaocdn.net 도메인에 대한 원격 패턴 등록
타입 정의 및 상수
apps/admin/src/app/_api/types.ts, apps/admin/src/app/requests/[id]/_api/types.ts, apps/admin/src/consts/campus.ts, apps/admin/src/consts/path.ts
새로운 타입 추가(Category, Tag, RequestReview, HandleReview), Request 타입 업데이트(icon → campus/categories/tags), placeId를 string에서 number로 변경, CHEANAN을 CHEONAN으로 수정, API/CLIENT 경로를 단수형에서 복수형으로 변경
API 서비스 함수
apps/admin/src/app/_api/services/request.ts, apps/admin/src/app/requests/[id]/_api/services/request.ts
요청 목록 조회(getRequests), 상세 정보 조회(getRequestDetail), 검토 제출(requestReview) 함수 추가
메인 페이지 동적화
apps/admin/src/app/page.tsx
비동기 함수로 변경, 목데이터 제거, getRequests를 통한 실시간 데이터 페칭, 캠퍼스별 데이터 분할 로직 추가
요청 상세 페이지 재구조화
apps/admin/src/app/request/[id]/page.tsx, apps/admin/src/app/request/[id]/RequestDetailPage.tsx, apps/admin/src/app/request/[id]/_components/...
기존 /request/[id] 구조 삭제
새로운 상세 페이지 구조
apps/admin/src/app/requests/[id]/page.tsx, apps/admin/src/app/requests/[id]/RequestDetailPage.tsx, apps/admin/src/app/requests/[id]/_components/...
새로운 /requests/[id] 구조 추가, 서버 컴포넌트 기반 데이터 페칭, 클라이언트 컴포넌트로 상세 뷰 렌더링
컴포넌트 업데이트
apps/admin/src/app/_components/RequestListItem/RequestListItem.tsx, apps/admin/src/app/requests/[id]/_components/ActionButtonGroup/ActionButtonGroup.tsx, apps/admin/src/app/requests/[id]/_components/Location/Location.tsx, apps/admin/src/app/requests/[id]/_components/Description/Description.tsx, apps/admin/src/app/requests/[id]/_components/RejectModal/RejectModal.tsx, apps/admin/src/app/requests/[id]/_components/Menus/...
Props 변경(icon → categories), 동적 태그 기반 칩 렌더링, handleReview 핸들러 추가, 임포트 경로 수정

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Home as Home Page<br/>(Server)
    participant API as API Service
    participant RequestList as Request List
    participant DetailPage as Detail Page<br/>(Server)
    participant DetailComponent as RequestDetailPage<br/>(Client)
    participant ReviewAPI as Review API

    User->>Home: 홈 페이지 접속
    Home->>API: getRequests()
    API-->>Home: Request[] 반환
    Home->>RequestList: 캠퍼스별로<br/>분할된 데이터 전달
    RequestList-->>User: 요청 목록 표시

    User->>DetailPage: 요청 상세 페이지 클릭
    DetailPage->>API: getRequestDetail(id)
    API-->>DetailPage: RequestDetail 반환
    DetailPage->>DetailComponent: data 전달
    DetailComponent-->>User: 상세 정보 표시

    User->>DetailComponent: 검토 결정
    alt 거절
        DetailComponent->>ReviewAPI: requestReview(REJECTED)
    else 등록
        DetailComponent->>ReviewAPI: requestReview(APPROVED)
    end
    ReviewAPI-->>DetailComponent: 응답
    DetailComponent-->>User: 완료 알림 및<br/>홈으로 이동
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 분

추가 검토 필요 영역:

  • 타입 시스템 변경이 모든 컴포넌트에 올바르게 전파되었는지 확인 (icon → categories/campus/tags)
  • API 경로 변경이 일관되게 적용되었는지 검증 (단수 → 복수 형태)
  • requestReview의 에러 핸들링 로직 (response.ok 체크)
  • 데이터 분할 로직 (캠퍼스별 partitioning)
  • 서버/클라이언트 컴포넌트 경계의 데이터 흐름 (async props)

Possibly related PRs

Suggested labels

✨ Feature

Poem

🐰 요청들을 다시 단장하고,
데이터는 이제 흐르는 물처럼,
캠퍼스별로 갈라지는 길,
상세 페이지로 드나드는 여정,
검토 결과 담아 되돌아오네! 🎉

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/#58

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 276ebab and bb3d689.

📒 Files selected for processing (21)
  • apps/admin/next.config.ts (1 hunks)
  • apps/admin/src/app/_api/services/request.ts (1 hunks)
  • apps/admin/src/app/_api/types.ts (1 hunks)
  • apps/admin/src/app/_components/RequestListItem/RequestListItem.tsx (2 hunks)
  • apps/admin/src/app/page.tsx (1 hunks)
  • apps/admin/src/app/request/[id]/RequestDetailPage.tsx (0 hunks)
  • apps/admin/src/app/request/[id]/_components/ActionButtonGroup/ActionButtonGroup.tsx (0 hunks)
  • apps/admin/src/app/request/[id]/_components/Location/Location.tsx (0 hunks)
  • apps/admin/src/app/request/[id]/page.tsx (0 hunks)
  • apps/admin/src/app/requests/[id]/RequestDetailPage.tsx (1 hunks)
  • apps/admin/src/app/requests/[id]/_api/services/request.ts (1 hunks)
  • apps/admin/src/app/requests/[id]/_api/types.ts (2 hunks)
  • apps/admin/src/app/requests/[id]/_components/ActionButtonGroup/ActionButtonGroup.tsx (1 hunks)
  • apps/admin/src/app/requests/[id]/_components/Description/Description.tsx (1 hunks)
  • apps/admin/src/app/requests/[id]/_components/Location/Location.tsx (1 hunks)
  • apps/admin/src/app/requests/[id]/_components/Menus/Menu.tsx (1 hunks)
  • apps/admin/src/app/requests/[id]/_components/Menus/Menus.tsx (1 hunks)
  • apps/admin/src/app/requests/[id]/_components/RejectModal/RejectModal.tsx (2 hunks)
  • apps/admin/src/app/requests/[id]/page.tsx (1 hunks)
  • apps/admin/src/consts/campus.ts (1 hunks)
  • apps/admin/src/consts/path.ts (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@leeleeleeleejun leeleeleeleejun changed the title Feat/#58 Feat/#58 admin api 연동 Nov 12, 2025
@leeleeleeleejun leeleeleeleejun marked this pull request as ready for review November 12, 2025 09:10
@leeleeleeleejun leeleeleeleejun merged commit 5dd4807 into develop Nov 12, 2025
1 check was pending
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] admin 페이지 api 기능 구현

2 participants